﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoolCode
{
    public interface IPageable
    {
        int PageIndex { get; }
        int PageSize { get; }
        int TotalRecords { get; }
        int PageCount { get; }
    }

    public interface IPaginatedList:IPageable
    {
        bool HasPreviousPage { get; }
        bool HasNextPage { get; }
    }

    /// <summary>
    /// Paging Parameter
    /// </summary>
    public class PageParam
    {
        /// <summary>
        /// Default: 0
        /// </summary>
        public int PageIndex { get; set; }
        /// <summary>
        /// Default: 15
        /// </summary>
        public int PageSize { get; set; }

        public PageParam()
            : this(0)
        {
        }

        public PageParam(int pageIndex) : this(pageIndex, 15) { }

        public PageParam(int pageIndex, int pageSize)
        {
            this.PageIndex = pageIndex;
            this.PageSize = pageSize;
        }
    }


}
